<template>
  <div>
    <div class="app-container">
      <mt-header fixed :title="data.name">
        <router-link slot="left" to="">
          <mt-button icon="back" @click.native="$router.back()">
            返回
          </mt-button>
        </router-link>
      </mt-header>

      <div>&nbsp;</div>
      <div>&nbsp;</div>
      // inut

      <div v-for="q in data.questions" :key="q.id">
        <mt-radio
          :title="q.question"
          v-model="q.value.value_suggested"
          :options="q.labels"
        >
        </mt-radio>
      </div>

      <mt-button size="small" @click.native="handleSubmit"> ok </mt-button>

      {{ data }}
    </div>
  </div>
</template>

<script>
export default {
  name: 'PartnerEmployee',
  components: {},
  directives: {},
  filters: {},
  props: {},

  data() {
    return {
      //
      birthday: '',
      value1: '',
      value: []
    }
  },
  computed: {
    data: function() {
      return this.$store.state.appSurveyInput.dataDict
    }
  },
  async created() {
    const { id } = this.$route.query
    this.$store.dispatch('appSurveyInput/browse_one', { id })

    // this.dispatch('appSurveyInput/browse_one',
  },

  methods: {
    async handleGo() {
      //
    },
    async handleSubmit() {
      //
      console.log('handleSubmit', this.data)
      this.$store.dispatch('appSurveyInput/write', this.data)
      console.log('handleSubmit 2', this.data)
    }
  }
}
</script>

<style type="text/css"></style>
